#include "config.h"
#include "user_task.h"

point_t test_path[] =
{
 {0.0,0.0,0.0,0.0},
 {-1800.0,30.0,0.0},
 {-1800.0,2800.0,0.0}

};

#ifdef DEBUG

ConfigParam_t param_chassis ={

#else
	
static const ConfigParam_t param_chassis ={

#endif

   .chassis = {/**/

		 
    .C6020Angle_param = {
      .p = 90.0f,
      .i = 0.4f,
      .d = 50.0f,
      .i_limit = 250.0f,
      .out_limit = 600.0f,
    },
    .C6020Omega_param = {
      .p = 25.0f,
      .i = 0.1f,
      .d = 0.0f,
      .i_limit = 20000.0f,
      .out_limit = 30000.0f,
    },

     .AngleCor_param = {
			 .p =5000.0f,
			.i =0.0f,
			.d =0.0f,
			.i_limit = 0.0f,
			.out_limit =3000.0f,
     },
     .OmegaCor_param = {
			.p =0.0f,
			.i =0.0f,
			.d =0.0f,
			.i_limit = 0.0f,
			.out_limit =0.0f,
     },
		 
		.chassis_type =CHASSIS_TYPE_AGV,
		.Agv6020zeroPos = {60.08-90,259.48-90,239.92-90,188.28-90},
		.motor_type =AGV_Group,
		.AgvZeroPos = {
			.WheelXpos[0] = 0.23f,
			.WheelYpos[0] = 0.2f,
			
			.WheelXpos[1] = -0.23f,
			.WheelYpos[1] = -0.2f,
			
			.WheelXpos[2] = 0.23f,
			.WheelYpos[2] = -0.2f,
			
			.WheelXpos[3] = -0.23f,
			.WheelYpos[3] = 0.2f,		
		},
		 
   },

 

   .ops  = {/**/

     .path = test_path,
		 .path_num = sizeof(test_path)/sizeof(test_path[0]),
     .ops_pid =
	 {
	  .path_speed_pid_param =
	  {
       .p = 0.055f,
	   .i = 0.002f,
	   .d = 0.0f,
	   .i_limit = 0.05f,
	   .out_limit = 0.9f,
	  },
	 .pid_InnerAngle_param = 
	 {
       .p = 0.045f,
	   .i = 0.0f,
	   .d = 0.0f,
	   .i_limit = 200.0f,
	   .out_limit = 50.0f,

	 },
	 .pid_OutAngle_param = 
	 {
        .p = 0.5f,
		.i = 0.0f,
		.d = 0.0f,
		.i_limit = 2000.0f,
		.out_limit = 100.0f,
	 },
	 .pid_pos_x_inner_param =
	 {
        .p = 0.4f,
		.i = 0.01f,
		.d = 0.0f,
		.i_limit = 0.3f,
		.out_limit = 2.0f,
	 },
	 .pid_pos_x_out_param = 
	 {
		.p = 0.0125f,
		.i = 0.0f,
		.d = 0.2f,
		.i_limit = 40.0f,
		.out_limit = 500.0f,
	 },
	 .pid_pos_y_inner_param =
	 {
        .p = 0.4f,
		.i = 0.01f,
		.d = 0.0f,
		.i_limit = 0.3f,
		.out_limit = 2.0f,
	 },
	 .pid_pos_y_out_param =
	 {
        .p = 0.0125f,
		.i = 0.0f,
		.d = 0.2f,
		.i_limit = 40.0f,
		.out_limit = 500.0f,
	 },
	 .pid_PosSpeed_x_param =
	 {
        .p = 1.5f,
		.i = 0.3f,
		.d = 0.1f,
		.i_limit = 0.0f,
		.out_limit = 9000.0f,
	 },
	 .pid_PosSpeed_y_param = 
	 {
        .p = 1.5f,
		.i = 0.3f,
		.d = 0.1f,
		.i_limit = 0.0f,
		.out_limit = 9000.0f,
	 },
	 
   },
 },
   .can = {
     .chassis5065 = BSP_CAN_1,
     .chassis6020 = BSP_CAN_2,

   },



};


const ConfigParam_t *Config_ChassisGet(void)
{
  return &param_chassis;
}

